﻿using System;
using System.Collections.Generic;
using System.Data;
using Unis.Framework.RuleBase.Common;
using KingRoad.EPM.CompletionMaterialsEntity.Model;
using System;

namespace KingRoad.EPM.CompletionMaterialsDAL.BcdProfiletypeService
{    
    /// <summary> 
    /// 文件生成时间 2017/8/21 10:02:02
    /// </summary> 
    public class BcdProfiletypeService :BaseService<BcdProfiletypeInfo>, IBcdProfiletypeService
    {
        /// <summary>
        /// 根据项目材料类型id  获取该项目下此文档类型的子类型个数
        /// </summary>
        /// <param name="Pft_ID">项目材料类型id</param>
        /// <returns></returns>
        public int GetSonCountByPftID(string Pft_ID)
        {
            string strSql = "select Count(Pft_ID) as numb from Bcd_ProFileType where  Pft_PID='" + Pft_ID + "' ";
            DataTable dt = DatabaseExcuteBySql.QuerybySql(strSql);
            return Convert.ToInt32(dt.Rows[0][0]);
        }
    }

}

